clear all
set more off
set maxvar 11000
set matsize 11000

global input "...\replication\Section 6\01_data"

use "$input\i_vars.dta", clear

gen X_n = 0.4*w*pop

foreach i in x_com y_com pop area Q w surf X_n {
replace `i' = log(`i')
}

* OLS
reg surf X_n, r

* IV
ivreg2 surf (X_n = y_com), r first
